package com.hrt.web.product.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.hrt.bean.GiftDetail;
import com.hrt.web.product.dao.GiftDetailDao;
import com.hrt.web.product.service.GiftDetailService;
@Service
@Transactional
public class GiftDetailServiceWebImpl implements GiftDetailService{
	@Autowired 
	private GiftDetailDao giftDetailDao;
	@Override
	/**根据礼品基本信息的id找到礼品规格的id集合*/
	public List<String> getDetailIdforId(Long id) {
		return giftDetailDao.getDetailIdforId(id);
	}
	@Override
	/**根据礼品基本信息的id和color找到礼品规格集合*/
	public List<GiftDetail> getColorAndGI(Long giftId, String color) {
		return giftDetailDao.getColorAndGI(giftId, color);
	}
	@Override
	/**根据礼品基本信息的id找到礼品规格的集合*/
	public List<GiftDetail> getDetailByGI(Long giftId) {
		return giftDetailDao.getDetailByGI(giftId);
	}
	@Override
	/**根据礼品基本信息的id和gdName找到礼品规格集合*/
	public GiftDetail getByGiftIdAndName(Long giftId, String gdName) {
		return giftDetailDao.getByGiftIdAndName(giftId, gdName);
	}
	@Override
	/**根据礼品基本信息的id查找礼品规格*/
	public GiftDetail getGiftDetailById(Long id) {
		return giftDetailDao.getById(id);
	}
	@Override
	public void updateGiftDetail(GiftDetail giftDetail) {
		giftDetailDao.updateEntity(giftDetail);
		
	}

}
